using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using UmlDesigner.Model;

namespace UmlDesigner
{
    public partial class DataModelDiagnosticsForm : Form
    {
        public DataModelDiagnosticsForm()
        {
            InitializeComponent();
        }

        private void DataModelDiagnosticsForm_Load(object sender, EventArgs e)
        {
        }

        internal void DumpDataModel(Document doc)
        {
            TreeNode node = treeView1.Nodes.Add("Document");
            
            StringWriter stream = new StringWriter();
            doc.Dump(node);
            //richTextBox1.Text = stream.ToString();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            treeView1.ExpandAll();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            treeView1.CollapseAll();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            treeView1.SelectedNode.ExpandAll();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            treeView1.SelectedNode.Collapse(false);
        }

    }
}